package com.cbs.java.component.database;

import java.util.List;

/**
 * Created by brochexu on 9/30/14.
 */
public interface Database {
    <T> List<T> query(String sql, Class<T> classOfT) throws Exception;

    <T> T fetch(String sql, Class<T> classOfT) throws Exception;

    <T> T scalar(String sql, Class<T> classOfT) throws Exception;

    void execute(String sql);

    int insert(String sql);

    int update(String sql);

    int delete(String sql);

    void executeBatch(List<String> sqls);
}
